<html><head><title>GetGadgetState</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">GetGadgetState()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#006666"><b>GetGadgetState</b></font>(#Gadget)</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Returns the current state of the gadget. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Gadget</i></td>
<td width="90%"> 
The gadget to use. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

Returns the state of the gadget. See below for its meaning depending on the gadget type. 

</blockquote><p><b>Remarks</b></p><blockquote>

This is a universal function which works for almost all gadgets: 
<br>
<br>
- <a href="buttonimagegadget.html">ButtonImageGadget()</a>: returns 1 if a #PB_Button_Toggle button is toggled, else 0. 
<br>
- <a href="buttongadget.html">ButtonGadget()</a>: returns 1 if a #PB_Button_Toggle button is toggled, else 0. 
<br>
- <a href="calendargadget.html">CalendarGadget()</a>: returns the currently selected date. 
<br>
- <a href="checkboxgadget.html">CheckBoxGadget()</a>: Returns one of the following values: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_CheckBox_Checked</font>  : The check mark is set.
  <font color="#924B72">#PB_CheckBox_Unchecked</font>: The check mark is not set.
  <font color="#924B72">#PB_CheckBox_Inbetween</font>: The "in between" state is set. (Only for <font color="#924B72">#PB_CheckBox_ThreeState</font> checkboxes)
</font></pre>
- <a href="comboboxgadget.html">ComboBoxGadget()</a>: returns the currently selected item index, -1 if none is selected. 
<br>
- <a href="dategadget.html">DateGadget()</a>: returns the currently selected date/time. IF <font color="#924B72">#PB_Date_CheckBox</font> was used, and the checkbox is unchecked, 0 is returned. 
<br>
- <a href="explorerlistgadget.html">ExplorerListGadget()</a>: returns the index of the first selected item in the Gadget, -1 if none is selected. 
<br>
- <a href="explorertreegadget.html">ExplorerTreeGadget()</a>: returns the type of the currently selected item (<font color="#924B72">#PB_Explorer_File</font> or <font color="#924B72">#PB_Explorer_Directory</font>). 
<br>
- <a href="imagegadget.html">ImageGadget()</a>: returns the ImageID of the currently displayed image. 
<br>
- <a href="ipaddressgadget.html">IPAddressGadget()</a>: returns the current IP address. 
<br>
- <a href="listicongadget.html">ListIconGadget()</a>: returns the first selected item index, -1 if none is selected. 
<br>
- <a href="listviewgadget.html">ListViewGadget()</a>: returns the currently selected item index, -1 if none is selected. 
<br>
- <a href="mdigadget.html">MDIGadget()</a>: returns the currently focused child window, -1 if none has the focus. 
<br>
- <a href="optiongadget.html">OptionGadget()</a>: returns 1 if activated, 0 otherwise. 
<br>
- <a href="panelgadget.html">PanelGadget()</a>: returns the current panel index, -1 if no panel. 
<br>
- <a href="progressbargadget.html">ProgressBarGadget()</a>: returns the current value of the ProgressBar. 
<br>
- <a href="scrollbargadget.html">ScrollBarGadget()</a>: returns the current slider position. 
<br>
- <a href="shortcutgadget.html">ShortcutGadget()</a>: returns the currently selected keyboard shortcut. 
<br>
- <a href="spingadget.html">SpinGadget()</a>: returns the current value of the SpinGadget. 
<br>
- <a href="splittergadget.html">SplitterGadget()</a>: returns the current splitter position, in pixels. 
<br>
- <a href="trackbargadget.html">TrackBarGadget()</a>: returns the current position of the TrackBar (value inside the minimum - maximum range). 
<br>
- <a href="treegadget.html">TreeGadget()</a>: returns the currently selected item index, -1 if none is selected. 

</blockquote><p><b>See Also</b></p><blockquote>

<a href="setgadgetstate.html">SetGadgetState()</a>, <a href="getgadgetitemstate.html">GetGadgetItemState()</a>, <a href="setgadgetitemstate.html">SetGadgetItemState()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=getgadgetitemtext.html>GetGadgetItemText()</a> - <a href=index.html>Gadget Index</a> - <a href=getgadgettext.html>GetGadgetText()</a> ->

</body></html>